package com.example.Wisdompark.service;

import com.example.Wisdompark.dao.ReturnOrderMapper;
import com.example.Wisdompark.pojo.Return_Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.util.List;

@Repository
public class ReturnOrderImpl implements ReturnOrderService{
    @Autowired
    private ReturnOrderMapper returnOrderMapper;

    @Override
    public List<Return_Order> queryAllOrder() {
        return returnOrderMapper.queryAllOrder();
    }

    @Override
    public int insertAOrder(Return_Order return_order) {
        return returnOrderMapper.insertAOrder(return_order);
    }

    @Override
    public int delAOrder(String order_num) {
        return returnOrderMapper.delAOrder(order_num);
    }

    @Override
    public int updateAOrder(Return_Order return_order) {
        return returnOrderMapper.updateAOrder(return_order);
    }

    @Override
    public Return_Order queryByOrderNum(String order_num) {

        return returnOrderMapper.queryByOrderNum(order_num);
    }

    @Override
    public int updateOrderState(String order_num, int state) {
        return returnOrderMapper.updateOrderState(order_num,state);
    }
}
